<?php
namespace Framework\DiServices;

use Phalcon\Annotations\Adapter\Files;
use Phalcon\Annotations\Adapter\Memory;

class Annotation
{
    public static function new($annotationsPath)
    {
        if (is_dir($annotationsPath)) {
            return new Files(['annotationsDir' => $annotationsPath]);
        }

        return new Memory();
    }
}
